package com.org.redis.omos;

import com.org.redis.config.JedisClient;

import java.util.Set;

public class SetDemo {

    public static void main(String[] args) {
//        Jedis jedis = JedisUtils.getJedis();
        //存值
        JedisClient.sadd("users1","a","b","c","d");
        //删除
        //jedis.srem("users","a");
        //取值
        //Set<String> user = jedis.smembers("user1"); //返回所有的值
        //Long user1 = jedis.scard("user"); //反正set集合里的个数

        //user.forEach(System.out::println);

        JedisClient.sadd("users2","b","e","g");

        Set<String> con = JedisClient.sinter("users1","users2");
        con.forEach(System.out::println);

    }
}
